package com.travel.server.manager.impl.controller;

import com.travel.server.manager.api.IUserService;
import com.travel.server.manager.dto.request.EmptyRequest;
import com.travel.server.manager.dto.request.user.*;
import com.travel.server.manager.impl.controller.base.AbstractController;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: LiZhenhui
 * @Date: 2018/11/20 12:29
 * @Desc:
 */
@RestController
public class UserController extends AbstractController implements IUserService {
    @Override
    public Object queryUserList(@RequestBody QueryUserListRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryUserDetail(@RequestBody QueryUserDetailRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object updateUser(@RequestBody UpdateUserRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object deleteUser(@RequestBody DeleteUserRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryDepartmentList(@RequestBody QueryDepartmentListRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryDepartmentDetail(@RequestBody QueryDepartmentDetailRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object updateDepartment(@RequestBody UpdateDepartmentRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object deleteDepartment(@RequestBody DeleteDepartmentRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryPermission(@RequestBody QueryPermissionRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object updatePermission(@RequestBody UpdatePermissionRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryDepartmentEnum(@RequestBody EmptyRequest request) {
        return this.getCommand().handle(request);
    }

    @Override
    public Object queryUserEnum(EmptyRequest request) {
        return this.getCommand().handle(request);
    }
}
